package com.kwan.xframe.upload;


import com.kwan.xframe.api.BaseAPIUtil;
import com.kwan.xframe.api.CountingRequestBody;
import com.kwan.xframe.mvp.model.BaseModel;
import com.kwan.xframe.mvp.presenter.IBasePresenter;

import java.io.File;
import java.util.HashMap;

/**
 *
 * Created by Administrator on 2018/3/20.
 */

public class UploadModel extends BaseModel{

	BaseAPIUtil mBaseAPIUtil;
	public UploadModel(IBasePresenter iBasePresenter) {
		super(iBasePresenter);
		mBaseAPIUtil = new BaseAPIUtil() {
			@Override
			protected String getBaseUrl() {
				return null;
			}

			@Override
			protected String getBaseTokenUrl() {
				return null;
			}

			@Override
			protected String getBaseUpLoadUrl() {
				return null;
			}

			@Override
			protected String getToken() {
				return null;
			}
		};
	}


	public void uploadFile(String url, File file, String fileArgName, HashMap<String, String> args,
						   CountingRequestBody.Listener listener){
		mBaseAPIUtil.uploadFile(BaseAPIUtil.UPLOAD_TYPE.FILE,url,file,fileArgName,args,listener);
	}


}
